﻿using System;
using System.Xml;
namespace EasyLoger.Configuration
{
    internal class FileLogConfig
    {
        private string _filePath;
        public string FilePath
        {
            get
            {
                return this._filePath;
            }
        }
        public FileLogConfig(XmlNode node)
        {
            this._filePath = node.SelectSingleNode("param[@name='path']").Attributes["value"].Value;
            string text = AppDomain.CurrentDomain.BaseDirectory;
            if (text.EndsWith("\\"))
            {
                text = text.Substring(0, text.Length - 1);
            }
            this._filePath = this._filePath.Replace("$apppath", text);
        }
    }
}
